package com.forlgb.powercloud.seata.common.rpc;

import com.forlgb.powercloud.seata.common.dto.AccountDTO;
import com.forlgb.powercloud.seata.common.response.ObjectResponse;
import com.forlgb.powercloud.seata.common.rpc.fallback.IFeignAccountClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "seata-account-service", fallback = IFeignAccountClientFallback.class)
public interface IFeignAccountClient {
    /**
     * 扣减账户余额
     */
    @PostMapping("/account/dec_account")
    ObjectResponse decreaseAccount(@RequestBody AccountDTO accountDTO);
}
